From 593806e0decd46f7b6d8c80b29adfd091d1de0e3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 5 Feb 2004 20:35:57 +0000 Subject: [PATCH] Fix the logic of the depth one check. (#133488, Christian Persch) Thu Feb 5 21:36:43 2004 Matthias Clasen * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic of the depth one check. (#133488, Christian Persch) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkcombobox.c | 22 ++++++++++++++++++++-- 6 files changed, 45 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0b7093b35..ac3f1ef5e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 5 21:36:43 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic + of the depth one check. (#133488, Christian Persch) + Thu Feb 5 01:50:19 2004 Matthias Clasen * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c0b7093b35..ac3f1ef5e4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Thu Feb 5 21:36:43 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic + of the depth one check. (#133488, Christian Persch) + Thu Feb 5 01:50:19 2004 Matthias Clasen * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c0b7093b35..ac3f1ef5e4 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Thu Feb 5 21:36:43 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic + of the depth one check. (#133488, Christian Persch) + Thu Feb 5 01:50:19 2004 Matthias Clasen * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c0b7093b35..ac3f1ef5e4 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Thu Feb 5 21:36:43 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic + of the depth one check. (#133488, Christian Persch) + Thu Feb 5 01:50:19 2004 Matthias Clasen * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c0b7093b35..ac3f1ef5e4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Thu Feb 5 21:36:43 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): Fix the logic + of the depth one check. (#133488, Christian Persch) + Thu Feb 5 01:50:19 2004 Matthias Clasen * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_paint): Fix diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 248a1824b4..eef5ea6f83 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -255,6 +255,10 @@ static void gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout static void gtk_combo_box_cell_layout_reorder (GtkCellLayout *layout, GtkCellRenderer *cell, gint position); +#if 1 +static gboolean gtk_combo_box_mnemonic_activate (GtkWidget *widget, + gboolean group_cycling); +#endif GType @@ -317,6 +321,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) widget_class->size_request = gtk_combo_box_size_request; widget_class->expose_event = gtk_combo_box_expose_event; widget_class->scroll_event = gtk_combo_box_scroll_event; + widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate; object_class = (GObjectClass *)klass; object_class->set_property = gtk_combo_box_set_property; @@ -2599,7 +2604,8 @@ gtk_combo_box_get_active_iter (GtkComboBox *combo_box, * @combo_box: A #GtkComboBox * @iter: The #GtkTreeIter. * - * Sets the current active item to be the one referenced by @iter. + * Sets the current active item to be the one referenced by @iter. + * @iter must correspond to a path of depth one. * * Since: 2.4 **/ @@ -2613,7 +2619,7 @@ gtk_combo_box_set_active_iter (GtkComboBox *combo_box, path = gtk_tree_model_get_path (gtk_combo_box_get_model (combo_box), iter); g_return_if_fail (path != NULL); - g_return_if_fail (gtk_tree_path_get_depth (path) != 1); + g_return_if_fail (gtk_tree_path_get_depth (path) == 1); gtk_combo_box_set_active (combo_box, gtk_tree_path_get_indices (path)[0]); gtk_tree_path_free (path); @@ -2822,3 +2828,15 @@ gtk_combo_box_remove_text (GtkComboBox *combo_box, NULL, position)) gtk_list_store_remove (store, &iter); } + + +#if 1 +static gboolean +gtk_combo_box_mnemonic_activate (GtkWidget *widget, + gboolean group_cycling) +{ + g_print ("I'm here!\n"); + gtk_widget_grab_focus (GTK_COMBO_BOX (widget)->priv->tree_view); + return TRUE; +} +#endif -- 2.30.2